<template>
  <div class="app-init">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
  export default {
    name: 'app',
    created() {
      if (window.JSInterface) {
        let authKey = window.JSInterface.getAuthorization()
        this.$store.commit('setAuthorKey', authKey)
      } 
      // else {
      //   this.$store.commit('setAuthorKey', 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTk5OTk2IiwiZXhwIjoxNTU5NTY5MzgyLCJpc3MiOiJOZ3ciLCJhdWQiOiJDQUQifQ.QKCO11d_Ru9fPSbLyMWkM7J47gssj7EmBFvwSL0knqY')
      // }
    },
    mounted() {
      
    }
  }
</script>
